package com.qf.sclg.controller;

import com.qf.sclg.result.ResponseData;
import com.qf.sclg.service.PicService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * (Pic)表控制层
 *
 * @author makejava
 * @since 2021-10-13 10:39:57
 */
@RestController
@RequestMapping("pic")
public class PicController {

    @Autowired
    private PicService picService;

    @ApiOperation(value="get picture")
    @ApiImplicitParams({
            @ApiImplicitParam(name="type",value = "",dataType = "string",required = true),
            @ApiImplicitParam(name="status",value = "0/1",dataType = "int",required = true),
    })
    @RequestMapping("/api/query/{type}/{status}")
    public ResponseData queryByType(@PathVariable("status") Integer status, @PathVariable("type") String type){
        ResponseData responseData= picService.queryByType(type,status);
        return responseData;
    }

}

